package hcn.protocol.brandnew.feiyong.feiyongqingdan;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 * 住院汇总费用信息查询-响应消息（成功） - ODS_04030006_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class MiQuerySetlinfoResponse {

    /**
     * 医院名称，公有模板，可能为空
     */
    @XmlElement(name = "VisitOrganizationName")
    private String visitOrganizationName;
    /**
     * 医院ID，医院系统身份标识
     */
    @XmlElement(name = "VisitOrganization")
    private String visitOrganization;
    /**
     * 住院号
     */
    @XmlElement(name = "VisitId")
    private String visitId;
    /**
     * 患者姓名
     */
    @XmlElement(name = "Name")
    private String name;
    /**
     * 住院号码
     */
    @XmlElement(name = "HospizationId")
    private String hospizationId;
    /**
     * 住院科室
     */
    @XmlElement(name = "VisitDeptName")
    private String visitDeptName;
    /**
     * 病床号
     */
    @XmlElement(name = "SickbedId")
    private String sickbedId;
    /**
     * 入院日期
     */
    @XmlElement(name = "AdmissionDateTime")
    @XmlJavaTypeAdapter(DateTimeAdapter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date admissionDateTime;
    /**
     * 出院日期
     */
    @XmlElement(name = "DischargeDateTime")
    @XmlJavaTypeAdapter(DateTimeAdapter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dischargeDateTime;
    /**
     * 住院总费用
     */
    @XmlElement(name = "HospizationCost")
    private String hospizationCost;
    /**
     * 住院总押金
     */
    @XmlElement(name = "Prepaid")
    private String prepaid;
    /**
     * 自费金额
     */
    @XmlElement(name = "PersonalCost")
    private String personalCost;
    /**
     * 大类费用集合（一级）
     */
    @XmlElementWrapper(name = "MainCostLists")
    @XmlElement(name = "MainCostList")
    private List<MainCostList> mainCostLists;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class CostList {

        /**
         * 费用名称
         */
        @XmlElement(name = "CostName")
        private String costName;
        /**
         * 数量
         */
        @XmlElement(name = "CostNumber")
        private String costNumber;
        /**
         * 单位
         */
        @XmlElement(name = "NumberUnit")
        private String numberUnit;
        /**
         * 单价
         */
        @XmlElement(name = "CostPrice")
        private String costPrice;
        /**
         * 小计金额
         */
        @XmlElement(name = "CostSubtotal")
        private String costSubtotal;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class MainCostList {

        /**
         * 费用大类名称
         */
        @XmlElement(name = "CostItemName")
        private String costItemName;
        /**
         * 大类费用总金额
         */
        @XmlElement(name = "ItemTypeCost")
        private String itemTypeCost;
        /**
         * 费用明细（二级）
         */
        @XmlElementWrapper(name = "CostLists")
        @XmlElement(name = "CostList")
        private List<CostList> costLists;
    }

}
